﻿package mortal.game.net.command.guildWineParty
{
    import Framework.MQ.*;
    import Message.BroadCast.*;
    import Message.Command.*;
    import Message.Public.*;
    import com.gengine.debug.*;
    import mortal.game.cache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class WinePartyCommand extends BroadCastCall
    {

        public function WinePartyCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_2:SGuildWinePartyRankInfo = null;
            var _loc_3:SEntityInfo = null;
            var _loc_4:SGuildWineToastInfo = null;
            Log.debug("I have receive WinePartyCommand");
            super.call(param1);
            switch(param1.messageHead.command)
            {
                case EPublicCommand._ECmdPublicGuildWinePartyOpen:
                {
                    NetDispatcher.dispatchCmd(ServerCommand.GuildWinePartyOpen, null);
                    break;
                }
                case EPublicCommand._ECmdPublicGuildWinePartyEnd:
                {
                    NetDispatcher.dispatchCmd(ServerCommand.GuildWinePartyEnd, null);
                    break;
                }
                case EPublicCommand._ECmdPublicGuildWinePartyOpenInfo:
                {
                    break;
                }
                case EPublicCommand._ECmdPublicGuildWinePartyRewardInfo:
                {
                    break;
                }
                case EPublicCommand._ECmdPublicGuildWinePartyRankInfo:
                {
                    _loc_2 = param1.messageBase as SGuildWinePartyRankInfo;
                    Cache.instance.copy.wineParty.winePartyDetailInfo = _loc_2;
                    NetDispatcher.dispatchCmd(ServerCommand.WinePartyDetailRankUpdate, null);
                    break;
                }
                case ECmdBroadCast._ECmdBroadcastEntityToastUpdate:
                {
                    _loc_3 = param1.messageBase as SEntityInfo;
                    NetDispatcher.dispatchCmd(ServerCommand.WinePartyToastUpdate, _loc_3);
                    break;
                }
                case ECmdBroadCast._ECmdBroadcastEntityDrunkUpdate:
                {
                    break;
                }
                case ECmdBroadCast._ECmdBroadcastEntityMoraUpdate:
                {
                    _loc_3 = param1.messageBase as SEntityInfo;
                    NetDispatcher.dispatchCmd(ServerCommand.WinePartyMoraUpdate, _loc_3);
                    break;
                }
                case EGateCommand._ECmdGatePlayerStartMora:
                {
                    _loc_4 = param1.messageBase as SGuildWineToastInfo;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
